<HTML><HEAD><TITLE>asm(+PredSpec, +WAMCode, +Flags)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(asm)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>asm(+PredSpec, +WAMCode, +Flags)</H1>
Assemble the WAM instructions WAMCode into ECLiPSe in module Module as
predicate PredSpec.  


<DL>
<DT><EM>+PredSpec</EM></DT>
<DD>Atom/Integer.
</DD>
<DT><EM>+WAMCode</EM></DT>
<DD>A list of WAM instructions in the right format.
</DD>
<DT><EM>+Flags</EM></DT>
<DD>An integer.
</DD>
</DL>
<H2>Description</H2>
   Assembles the WAM instruction WAMCode into the current ECLiPSe session
   in an existing module Module as the predicate PredSpec. The WAM code is
   in the form of a list, with each element representing one WAM
   instruction. The format of the WAMCode is the same as that generated by
   disasm/2,3. Thus the predicate can be used to load a predicate
   previously dissasembled by disasm/2,3 without having to compile the
   source Prolog form of the predicate.

<P>
   If PredSpec is an existing defined predicate, the older definition will
   be replaced. If WAMCode is not in the correct format, an exception will
   be generated and the predicate PredSpec would not be redefined. 

<P>

<H3>Fail Conditions</H3>
   None.
<H3>Resatisfiable</H3>
   No.
<H3>Exceptions</H3>
<DL>
<DT><EM>(5) type error </EM>
<DD>PredSpec or Module is not in correct form.
<DT><EM>(6) out of range </EM>
<DD>WAMCode is not in correct form.  
<DT><EM>(80) not a module </EM>
<DD>Module is not an existing module.
</DL>
<H2>See Also</H2>
<A HREF="../../lib/asm/asm-2.html">asm / 2</A>, <A HREF="../../lib/asm/disasm-2.html">disasm / 2</A>, <A HREF="../../lib/asm/disasm-3.html">disasm / 3</A>, <A HREF="../../lib/asm/pasm-4.html">pasm / 4</A>
</BODY></HTML>
